import { interfaces } from "inversify";
import { ClassType } from "../ioc/types";
import { TerminalAutoActivation } from "./activation";
import { CodeExecutionManager } from "./codeExecution/codeExecutionManager";
import { ICodeExecutionManager, ITerminalAutoActivation } from "./types";

interface IServiceRegistry {
  addSingleton<T>(
    serviceIdentifier: interfaces.ServiceIdentifier<T>,
    constructor: ClassType<T>,
    name?: string | number | symbol,
  ): void;
}

export function registerTypes(serviceManager: IServiceRegistry): void {
  serviceManager.addSingleton<ITerminalAutoActivation>(ITerminalAutoActivation, TerminalAutoActivation);
  serviceManager.addSingleton<ICodeExecutionManager>(ICodeExecutionManager, CodeExecutionManager);
}